package com.platform.util;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;
import org.springframework.stereotype.Component;

import java.io.IOException;
import java.util.Map;

@Component
@ConfigurationProperties(prefix = "wx")
public class WxProperties {

    /*#小程序账号: wxe3c68286119abc6a*/
    private  String appId;
    /*#小程序密钥: 174df977770e94d60dbb5063bea76f9b*/
    private  String secret;
    /* #商户号: 1581283241*/
    private  String mchId;
    /* #支付签名: 444*/
    private  String paySignKey;
    /* #交易类型: JSAPI*/
    private  String tradeType;
    /* #证书名称，对应不同的商户号: /cert/apiclient_cert.p12*/
    private  String certName;
    /*  #支付回调地址: http://wengl.51vip.biz:41224/platform-framework/api/pay/notify*/
    private  String notifyUrl;
    /*#获取code的请求地址: https://open.weixin.qq.com/connect/oauth2/authorize?appid=%s&redirect_uri=%s&response_type=code&scope=%s&state=STAT#wechat_redirect*/
    private  String code;
    /* #获取Web_access_tokenhttps的请求地址: https://api.weixin.qq.com/sns/jscode2session?appid=%s&secret=%s&js_code=%s&grant_type=authorization_code*/
    private  String webAccessTokenhttps;
    /* #拉取用户信息的请求地址: https://api.weixin.qq.com/sns/userinfo?access_token=%s&openid=%s&lang=zh_CN*/
    private  String userMessage;
    /*  #微信统一下单接口路径: https://api.mch.weixin.qq.com/pay/unifiedorder*/
    private  String uniformorder;
    /* #退款地址: https://api.mch.weixin.qq.com/secapi/pay/refund*/
    private  String refundUrl;
    /* #退款查询地址: https://api.mch.weixin.qq.com/pay/refundquery*/
    private  String refundqueryUrl;
    /*  #微信查询订单状态: https://api.mch.weixin.qq.com/pay/orderquery*/
    private  String orderquery;

    /* #微信请求access_token接口: https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s*/
    private  String accessToken;
    /*#获取小程序码: https://api.weixin.qq.com/wxa/getwxacodeunlimit*/
    private  String wXACodeUnlimit;
    /* #安全起见，暴露的短信接口需要配置有效的请求IP#企业付款: https://api.mch.weixin.qq.com/mmpaymkttransfers/promotion/transfers*/
    private  String orgPay;
    private  String sms;

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getSecret() {
        return secret;
    }

    public void setSecret(String secret) {
        this.secret = secret;
    }

    public String getMchId() {
        return mchId;
    }

    public void setMchId(String mchId) {
        this.mchId = mchId;
    }

    public String getPaySignKey() {
        return paySignKey;
    }

    public void setPaySignKey(String paySignKey) {
        this.paySignKey = paySignKey;
    }

    public String getTradeType() {
        return tradeType;
    }

    public void setTradeType(String tradeType) {
        this.tradeType = tradeType;
    }

    public String getCertName() {
        return certName;
    }

    public void setCertName(String certName) {
        this.certName = certName;
    }

    public String getNotifyUrl() {
        return notifyUrl;
    }

    public void setNotifyUrl(String notifyUrl) {
        this.notifyUrl = notifyUrl;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getWebAccessTokenhttps() {
        return webAccessTokenhttps;
    }

    public void setWebAccessTokenhttps(String webAccessTokenhttps) {
        this.webAccessTokenhttps = webAccessTokenhttps;
    }

    public String getUserMessage() {
        return userMessage;
    }

    public void setUserMessage(String userMessage) {
        this.userMessage = userMessage;
    }

    public String getUniformorder() {
        return uniformorder;
    }

    public void setUniformorder(String uniformorder) {
        this.uniformorder = uniformorder;
    }

    public String getRefundUrl() {
        return refundUrl;
    }

    public void setRefundUrl(String refundUrl) {
        this.refundUrl = refundUrl;
    }

    public String getRefundqueryUrl() {
        return refundqueryUrl;
    }

    public void setRefundqueryUrl(String refundqueryUrl) {
        this.refundqueryUrl = refundqueryUrl;
    }

    public String getOrderquery() {
        return orderquery;
    }

    public void setOrderquery(String orderquery) {
        this.orderquery = orderquery;
    }

    public String getAccessToken() {
        return accessToken;
    }

    public void setAccessToken(String accessToken) {
        this.accessToken = accessToken;
    }

    public String getwXACodeUnlimit() {
        return wXACodeUnlimit;
    }

    public void setwXACodeUnlimit(String wXACodeUnlimit) {
        this.wXACodeUnlimit = wXACodeUnlimit;
    }

    public String getOrgPay() {
        return orgPay;
    }

    public void setOrgPay(String orgPay) {
        this.orgPay = orgPay;
    }

    public String getSms() {
        return sms;
    }

    public void setSms(String sms) {
        this.sms = sms;
    }

    public  void main(String[] args) throws IOException {
        WxProperties wxProperties =new WxProperties();
        System.out.println(wxProperties.getAppId());
    }
}
